<!--
 * @Author: yaojian66 1327629137@qq.com
 * @Date: 2022-06-23 11:21:32
 * @LastEditors: yaojian66 1327629137@qq.com
 * @LastEditTime: 2022-06-23 11:33:50
 * @FilePath: \geyao\第十一题 伪类选择器.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>伪类选择器</title>
  <style type="text/css">
    /*补全代码*/
   li:nth-child(2n){
    background-color:rgb(255, 0, 0)
   }
  </style>
</head>
<body>
  <!-- 请将html模块中ul列表的第2个li标签和第4个li标签的背景颜色设置成"rgb(255, 0, 0)"。 -->
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
</ul>
</body>
</html>